﻿using AutoMapper;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using TianShu.Domain;
using TianShu.Domain.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using TianShu.Domain.Entities;

namespace TianShu.Service
{
    public class BaseServiceImpl : ServiceImpl, IService
    {
        public BaseServiceImpl()
        {
        }

    }
    public class BaseServiceImpl<TEntity, TKey> : BaseServiceImpl,IService
        where TEntity : class, IEntity<TKey>, new()
    {
        public BaseServiceImpl()
        {
        }

        public IRepository<TEntity, TKey> EntityRepository { get=> LazyServiceProvider.LazyGetRequiredService<IRepository<TEntity, TKey>>(); }
    }
}
